<%@ page
	language="java"
	contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib
	uri="http://java.sun.com/jsp/jstl/core"
	prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<meta
	http-equiv="Content-Type"
	content="text/html; charset=UTF-8">

<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script
	type="text/javascript"
	src="/resources/js/home.js"></script>

<link
	rel="stylesheet"
	type="text/css"
	href="/resources/css/home.css" />

<title>home.jsp</title>
</head>

<body> <!-- 로그인 시작 -->
	<!-- admin 로그인일때 -->
	<div id="admin">
		<c:if test="${isAdmin}">
			${sessionAdmin.adminName}님 접속
			<a href="/admin/adminHome">관리자 홈 고고</a>
		</c:if>
	</div>
	<!-- admin로그인이 아닐때 -->
	<c:if test="${!isAdmin}">
		<form
			method="post"
			action="/adminLogin/getAdminByIdAndPw">
			<div>
				<label for="adminId">ADMIN ID : </label>
				<input type = "text"
				id="adminId"
				name="adminId"
				value="1">				
			</div>
			<div>
			<label for ="adminPw">ADMIN PW : </label>
				<input type = "password"
				id = "adminPw"
				name = "adminPw"
				value="1">
			</div>
			<div>
				<input type = "submit"
				value="관리자 로그인">
			</div>
		</form>
	</c:if>
	<!-- admin 로그인화면 끄읕 -->
	
	<!-- 학생로그인 시작 -->
	
	<div>
		<form method = "post"
		action = "getStudentsByBanIdx"><!--  이거 왜 비어있지.. -->
		<div>
			<select
			name="banIdx"
			id="banIdx">
			<option> 반선택</option>
			<c:forEach var="ban" items="${banList}">
			<option value = "${ban.banIdx}">${ban.banName}</option>
			
			</c:forEach>
			
			</select>
		</div>
		<div>
			<select
				name="banName"
				id="banName">
			</select>
		
		</div>
		<div>
			<label for="studentPw">PW : </label> 
			<input type="password"
				id="studentPw"
				name="studentPw">
		</div>		
		<div>
			<input type="submit"
				value="학생 로그인">
		</div>		
		
		</form>		
	</div>
	<!-- 여까지 학생 로긴 -->
	
	<!-- 무시하고 게스트페이지로 -->
	<div id="guest">
		<a href="#"> guest page 이동 </a>
	</div>	
	
	

	<P>The time on the server is ${serverTime}.</P>
</body>
</html>
